<template>
    <Breadcrumb></Breadcrumb>
    <el-card>
        <el-row>
            <el-col :span="12">
                <div style="margin-top: 15px">
                    <el-input placeholder="请输入内容11111" v-model="input3" class="input-with-select">
                        <template #prepend>
                            <el-select v-model="select" placeholder="请选择">
                                <el-option label="餐厅名" value="1"></el-option>
                                <el-option label="订单号" value="2"></el-option>
                                <el-option label="用户电话" value="3"></el-option>
                            </el-select>
                        </template>
                        <template #append>
                            <el-button icon="el-icon-search"  @click="getMenuPage"></el-button>
                        </template>
                    </el-input>
                </div>
            </el-col>
        </el-row>
        <el-row>
            <el-col>
                <el-table :data="menuData" border style="width: 100%">
                    <el-table-column type="index"></el-table-column>
                    <el-table-column prop="id" label="ID" width="180"></el-table-column>
                    <el-table-column prop="menuTitle" label="标题" width="180"></el-table-column>
                    <el-table-column prop="menuName" label="名称" width="180"></el-table-column>
                    <el-table-column prop="menuCode" label="编码"></el-table-column>
                    <el-table-column prop="parentId" label="父菜单ID"></el-table-column>
                    <el-table-column prop="filePath" label="文件路径"></el-table-column>
                    <el-table-column prop="icon" label="图标"></el-table-column>
                    <el-table-column prop="router" label="路由"></el-table-column>
                    <el-table-column prop="sort" label="排序"></el-table-column>
                </el-table>
            </el-col>
        </el-row>

    </el-card>

</template>

<script>
    import Breadcrumb from '@/components/breadcrumb/Breadcrumb'
    import { queryMenuPage } from '@/request/api'

    export default {
        data() {
            return {
                menuData: [{
                    id: '12987122',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333'
                }, {
                    id: '12987123',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333'
                }, {
                    id: '12987125',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333'
                }, {
                    id: '12987126',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333'
                }]
            }
        },
        components: { Breadcrumb },
        created () {
            queryMenuPage({
                "pageSize":3,
                    "pageNum":1
            }).then(res =>{
                this.menuData =  res.data.rows;
            })
        },
        name :'TestMe',
        methods: {
            getMenuPage() {
                queryMenuPage({
                    "pageSize":3,
                    "pageNum":1
                }).then(res => {
                    this.menuRows = res.data;
                    console.log(res);
                })
            }
        },
    }
</script>

<style scoped>
    .el-select .el-input {
        width: 130px;
    }
    .input-with-select .el-input-group__prepend {
        background-color: #fff;
    }
</style>
